#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
#include<vector>
class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        for (int dest = 0, src = 0; src < nums.size(); src++) {
            if (nums[src] != 0) {
                swap(nums[dest++], nums[src]);
            }
        }
    }
};